﻿<UserControl x:Class="Dropthing.Silverlight.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid Style="{StaticResource TopGrid}">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Style="{StaticResource Header}">

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="50"/>
            </Grid.ColumnDefinitions>

            <Border Style="{StaticResource TitleBorder}">
                <TextBlock Text="DIGG SEARCH" Style="{StaticResource TitleText}"  />
            </Border>

            <TextBox x:Name="txtSearchTopic" Grid.Column="1" Padding="1,3,1,1"/>

            <Button x:Name="btnSearch" 
                    Content="Search" 
                    Click="SearchBtn_Click" 
                    Style="{StaticResource SearchButton}" />

        </Grid>
        <ListBox x:Name="StoriesList" SelectionChanged="StoriesList_SelectionChanged" Style="{StaticResource StoriesList}">

            <ListBox.ItemTemplate>
                <DataTemplate>

                    <StackPanel Orientation="Horizontal">

                        <!-- Yellow Digg Panel with NumDiggs-->
                        <StackPanel Style="{StaticResource DiggPanel}" >

                            <TextBlock Text="{Binding NumDiggs}" Style="{StaticResource NumDigsBlock}" />
                            <TextBlock Text="diggs" Style="{StaticResource NumDigsSubBlock}" />

                        </StackPanel>

                        <!-- Story Thumbnail Preview -->
                        <Image Source="{Binding ThumbNail}" Style="{StaticResource ThumbNailPreview}" />

                        <!-- Story Title-->
                        <TextBlock Text="{Binding Title}" Margin="5" Style="{StaticResource TitleBlock}"/>

                    </StackPanel>

                </DataTemplate>
            </ListBox.ItemTemplate>

        </ListBox>


    </Grid>
</UserControl>
